﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class MessagePanelContent : UIBaseContent
{
    public MessagePanelContent() : base(UIType.MessagePanelType) { }
}
public class MessagePanel : UIBaseView
{
    public Text MessageText;
    public Button closeButton;
    private void Awake()
    {
        closeButton.onClick.AddListener(OnClose);
    }
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    public void OnClose()
    {
        Singleton<ContentManager>.GetInstance().Pop();
    }
    public override void OnEnter(UIBaseContent uIContent)
    {
        GetComponent<BaseCG>().Show();
    }
    public override void OnPause(UIBaseContent uIContent)
    {
        GetComponent<BaseCG>().Hide();
    }
    public override void OnResume(UIBaseContent uIContent)
    {
        GetComponent<BaseCG>().Show();
    }
    public override void OnExit(UIBaseContent uIContent)
    {
        GetComponent<BaseCG>().Hide();
    }
}
